<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>06_函数</title>
</head>
<body>
<script>
    function f1(){
        console.log('f1被调用了');
    }
    f1();
    f1();

    function f2(n){
        console.log('f2被调用了')
        console.log(n);
    }
    f2(10);
    f2(true);
    f2('hello');

    function f3(x,y){
        console.log('f3被调用了');
        console.log(x+y);
    }
    f3(1,20);
    f3(10,20,30);
    f3(10);

    function f4(a,b){
        console.log('f4被调用了');
        return a+b;
    }
    console.log(f4(10,20));
    var r=f4(10,20)
    console.log(r);

    var f5 = function(x,y){
        console.log('f5被调了');
    }
    f5();
    console.log(f5);

    const f6 = ()=>{
        console.log('f6被调了');
    }
    f6();
    </script>
</body>
</html>